Mechanized Verification of Fine-grained Concurrent Programs User manual and code commentary

نویسندگان

  • Ilya Sergey
  • Aleksandar Nanevski
  • Anindya Banerjee
چکیده

specification of a lock. What is a suitable abstract specification for a locking structure? To answer this question, we adopt the idea of specifying concurrent data structures via abstract predicates [1] and provide a lock interface in the form of two abstract procedures: lock and unlock. Every data structure, implementing the lock protocol, will require to provide the implementation of these procedures. The lock interface is parametrized by two abstract predicates, constraining some part of the state: is_lock and locked. The former denotes the fact that the part of state implements belongs to the locking protocol, while the latter one identifies that the lock is currently being locked by the current thread. Both predicates should satisfy a number of axioms, which are packaged into a dependent record in the section LockStruct (where the predicates are referred to as locked_op and is_lock_op). For instance, the following axiom expresses the lock’s mutual exclusion property: forall s gl ge, locked_op gl ge s -> locked_op ge gl (transp s)-> False Specifically, it states that the situation when lock is held by the current thread (locked_op gl ge s) and it is simultaneously held by some other thread, which is expressed via a transposition of a concurroid’s state s (locked_op ge gl (transp s)), implies the falsehood. The other property implies that if the state represents a locked lock, it also corresponds to a resource, which belongs to the lock protocol: forall s gl ge, locked_op gl ge s -> is_lock_op gl ge s These two predicates serve as parameters to specifications lock_spec and unlock_spec, which are supposed to be fulfilled by the locking and unlocking procedures, correspondingly. Let us consider the specification for locking, defined as follows: Definition lock_spec is_lock locked : spec unit := (* precondition predicate *) (fun i => exists (hl he : heap) (gl ge: U) i’, i = hp ->> [hl, tt, he] \+ i’ /\ is_lock gl ge i’, (* postcondition predicate *) fun i y m => forall hl he (gl ge: U) i’, i = hp ->> [hl, tt, he] \+ i’ -> is_lock gl ge i’ -> exists h ge’ he’ m’, [/\ m = hp ->> [hl \+ h, tt, he’] \+ m’, locked gl ge’ m’, valid (gl \+ ge’) & I (gl \+ ge’) h]).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Design and implementation of static analyses for higher-order languages

interpretation-based static analyzers. This insight provided a way of extracting the common patterns in the design and implementation of static analyzers and led to the idea of considering abstract interpretation as a particular case of computational effects, which can be abstracted over using a concept of monads from functional programming. This idea was presented in my work on monadic abstrac...

متن کامل

Towards Structured Mechanized Verification of Fine-Grained Concurrent Programs

It has been long recognized that efficient parallelization is of crucial importance for high-performant software. Unfortunately, reasoning about correctness of concurrent programs, in which several computations can be executed in parallel and, thus, overlap in time, is challenging due to the large number of possible interactions between concurrent processes/threads on shared data structures. On...

متن کامل

Concurrent Data Structures Linked in Time (Artifact)

This artifact provides the full mechanization in FCSL of the developments in the companion paper, “Concurrent Data Structures Linked in Time”. In the latter, we propose a new method, based on a separation-style logic, for reasoning about concurrent objects with such linearization points. We embrace the dynamic nature of linearization points, and encode it as part of the data structure’s auxilia...

متن کامل

Automatic Verification for Fine-grained Concurrency

Recent program logics based on separation logic emphasise a modular approach to proving functional correctness for fine-grained concurrent programs. However, these logics have no automation support. In this paper, we present Caper, a prototype tool for automated reasoning in such a logic. Caper is based on symbolic execution, integrating reasoning about interference on shared data and about gho...

متن کامل

Modular fine-grained concurrency verification

Traditionally, concurrent data structures are protected by a single mutual exclusion lock so that only one thread may access the data structure at any time. This coarse-grained approach makes it relatively easy to reason about correctness, but it severely limits parallelism. More advanced algorithms instead perform synchronisation at a finer grain. They employ sophisticated synchronisation sche...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015